package kr.hkit.powerjava.chapter07.work;

public class Date {
	private int year;
	private int month;
	private int day;
	
	public Date() { } //기본 생성자
	
	public Date(int year, int month, int day){
		this.year = year;
		this.month = month;
		this.day = day;
	}
	
	public void setDate(int year, int month, int day){
		this.year = year;
		this.month = month;
		this.day = day;
	}

	public void print1() {
		System.out.println(this.year + "." + this.month + "." + this.day);
	}

	public void print2(){
		System.out.println(exchangeMonth()+" "+this.day+", "+this.year); 	
	}
	
	public String exchangeMonth()
	{
		String sMonth = null;
		switch(this.month){
		case 1 : 
			sMonth = "January";
			break;
		case 2 : 
			sMonth = "Febuary";
			break;
		case 3 : 
			sMonth = "March";
			break;
		case 4 : 
			sMonth = "April";
			break;
		case 5 : 
			sMonth = "May";
			break;
		case 6 : 
			sMonth = "June";
			break;
		case 7 : 
			sMonth = "July";
			break;
		case 8 : 
			sMonth = "Agguset";
			break;
		case 9 : 
			sMonth = "September";
			break;
		case 10 : 
			sMonth = "October";
			break;
		case 11 : 
			sMonth = "November";
			break;
		case 12 : 
			sMonth = "December";
			break;
		default :
			System.out.println("월을 잘 못 입력하셨습니다.");
		}
		return sMonth;
	}
	
	
}
